package cn.yy.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Wages entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wages", catalog = "phoneerp")
public class Wages implements java.io.Serializable {

	// Fields

	private Integer wagesId;
	private Emp emp;
	private Year year;
	private Month month;
	private Double basicWages;
	private Integer workkDay;
	private Double payableWages;
	private Double socialInsurance;
	private Double personalIncomeTax;
	private Double actualWages;

	// Constructors

	/** default constructor */
	public Wages() {
	}

	/** full constructor */
	public Wages(Emp emp, Year year, Month month, Double basicWages,
			Integer workkDay, Double payableWages, Double socialInsurance,
			Double personalIncomeTax, Double actualWages) {
		this.emp = emp;
		this.year = year;
		this.month = month;
		this.basicWages = basicWages;
		this.workkDay = workkDay;
		this.payableWages = payableWages;
		this.socialInsurance = socialInsurance;
		this.personalIncomeTax = personalIncomeTax;
		this.actualWages = actualWages;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "wagesId", unique = true, nullable = false)
	public Integer getWagesId() {
		return this.wagesId;
	}

	public void setWagesId(Integer wagesId) {
		this.wagesId = wagesId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empID", nullable = false)
	public Emp getEmp() {
		return this.emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "yearId", nullable = false)
	public Year getYear() {
		return this.year;
	}

	public void setYear(Year year) {
		this.year = year;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "monthId", nullable = false)
	public Month getMonth() {
		return this.month;
	}

	public void setMonth(Month month) {
		this.month = month;
	}

	@Column(name = "basicWages", nullable = false, precision = 22, scale = 0)
	public Double getBasicWages() {
		return this.basicWages;
	}

	public void setBasicWages(Double basicWages) {
		this.basicWages = basicWages;
	}

	@Column(name = "workkDay", nullable = false)
	public Integer getWorkkDay() {
		return this.workkDay;
	}

	public void setWorkkDay(Integer workkDay) {
		this.workkDay = workkDay;
	}

	@Column(name = "payable_wages", nullable = false, precision = 22, scale = 0)
	public Double getPayableWages() {
		return this.payableWages;
	}

	public void setPayableWages(Double payableWages) {
		this.payableWages = payableWages;
	}

	@Column(name = "socialInsurance", nullable = false, precision = 22, scale = 0)
	public Double getSocialInsurance() {
		return this.socialInsurance;
	}

	public void setSocialInsurance(Double socialInsurance) {
		this.socialInsurance = socialInsurance;
	}

	@Column(name = "personal_income_tax", nullable = false, precision = 22, scale = 0)
	public Double getPersonalIncomeTax() {
		return this.personalIncomeTax;
	}

	public void setPersonalIncomeTax(Double personalIncomeTax) {
		this.personalIncomeTax = personalIncomeTax;
	}

	@Column(name = "actual_wages", nullable = false, precision = 22, scale = 0)
	public Double getActualWages() {
		return this.actualWages;
	}

	public void setActualWages(Double actualWages) {
		this.actualWages = actualWages;
	}

}